﻿using System.Web.Mvc;

namespace Ornament.MVCWebFrame.Areas.DataBase
{
    public class DataBaseAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get { return "DataBase"; }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
                "DataBase_operator",
                "DataBase/{product}/{controller}/{action}/{name}/{version}",
                new {controller = "Table", action = "Index"}
                );
            context.MapRoute(
                "DataBase_List",
                "DataBase/{product}/{controller}/{action}/{version}",
                new {controller = "Table", action = "Index"}
                );

            context.MapRoute(
                "DataBase_default",
                "DataBase/{controller}/{action}/{id}",
                new {action = "Index", id = UrlParameter.Optional}
                );
        }
    }
}